package com.manshutingyu.common.mq.consumer;
@Component
@RocketMQMessageListener(
        topic = "test-topic",
        consumerGroup = "springboot-consumer-group",
        selectorExpression = "*",  // 订阅所有 Tag
        messageModel = MessageModel.CLUSTERING  // 集群消费模式
)
@Slf4j
public class RocketMQConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        log.info("收到消息: {}", message);
        // 业务处理逻辑
    }
}
